# -*- coding:utf8 -*-
__author__ = 'Forcs'

from django.contrib.auth.hashers import make_password, check_password

def encode_password(pw):
    """
    对密码进行加密
    :param pw: 被加密的密码明文
    :return: 被加密后的密码
    """
    return make_password(pw, "waN5a7V_")

def confirm_password(pw, encode):
    """
    校验密码
    :param pw:
    :param encode:
    :return:
    """
    return check_password(pw, encode)

